﻿using compshop.Infrastructure;
using compshop.Modules.PositionList.View;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;

namespace compshop.Modules.PositionList
{
    public class PositionListModule: IModule
    {
        private IUnityContainer container; 
        private IRegionManager regionManager;

        public PositionListModule(IUnityContainer Container, IRegionManager RegionManager)
        {
            container = Container;
            regionManager = RegionManager;
        }

        public void Initialize()
        {
            regionManager.Regions[RegionNames.PositionListContent].Add(container.Resolve<PositionListView>());
        }
    }
}
